#include "demo.h"

class DemoWidget : public QWidget
{
Q_OBJECT
public:
    DemoWidget(QWidget *parent=nullptr);
    ~DemoWidget();
private:
    Ui::HelloWidget *ui;

    // 读写
    std::string readTextEdit();
    void output(QString &text);

    // 逻辑
    bool calculate(const std::string &expression, int &result);
    int performOperation(char op, int a, int b);

private slots:
    // 按键
    void on_calButton_clicked();

};
